#ifndef AssociationSet_H_
#define AssociationSet_H_
#include <vector>
#include "KeyPoint.h"
#include "Plane.h"
#include "FrameNode.h"
#include "Association.h"
#include "PlaneAssociation.h"

class AssociationSet
{
	public:
/*	
		FrameNode * src_node;
		FrameNode * dst_node;

		std::vector<Plane *> src_plane_allocation;
		std::vector<Plane *> dst_plane_allocation;
		
		std::vector<Plane *> src_possible_unallocated_planes;
		std::vector<Plane *> dst_possible_unallocated_planes;
		
		std::vector<Plane *> selected_associations;
		std::vector<Plane *> possible_associations;
*/
		int len;
		double val;
		std::vector<Association *> selected_associations;
		std::vector<Association *> possible_associations;
		
		AssociationSet();
		AssociationSet(FrameNode * src,FrameNode * dst);
		~AssociationSet();
		
		AssociationSet clone();
		std::vector<AssociationSet> explore();
		bool testAssociation(Association * t);
		void select_association(Association * t);
		
		char * getHashValue();
		double estimateSearchValue();
		
		friend bool operator>  (AssociationSet &a, AssociationSet &b);
		friend bool operator<= (AssociationSet &a, AssociationSet &b);
 
		friend bool operator<  (AssociationSet &a, AssociationSet &b);
		friend bool operator>= (AssociationSet &a, AssociationSet &b);
};

bool operator> (AssociationSet &a, AssociationSet &b)	{ return a.val > b.val;}
bool operator<= (AssociationSet &a, AssociationSet &b)	{ return a.val <= b.val;}
bool operator< (AssociationSet &a, AssociationSet &b)	{ return a.val < b.val;}
bool operator>= (AssociationSet &a, AssociationSet &b)	{ return a.val >= b.val;}
#endif
